fix(coding-agent): hide Windows console windows for spawned subprocesses - #1140
Open
warmshao wants to merge 1 commit into
Open
fix(coding-agent): hide Windows console windows for spawned subprocesses#1140warmshao wants to merge 1 commit into
warmshao wants to merge 1 commit into
Conversation
On Windows, a console-less parent (the daemon and its session workers) spawning a console-subsystem child (node, python, git, npm via cmd shim, taskkill, ...) makes conhost pop a visible window for it; detached:true forces a brand-new console outright. Users see console windows flashing during agent activity — worker spawns titled with the ipython kernel command line, cmd.exe flashes on shell:true/execSync paths. An earlier pass covered the kernel/bootstrap/exec/lease spawns; this sweeps the rest: daemon/worker/catalog/update-coordinator launches, the bash tool, killProcessTree's taskkill, autonomous/rpc spawns, package manager command steps, config value and git resolution, clipboard tools, tool detection, session trash, and the footer's git probe. windowsHide is ignored on non-Windows platforms, so this is a no-op elsewhere. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On Windows, a console-less parent process (the daemon and its session workers) spawning a console-subsystem child (node, python, git, npm via its cmd shim, taskkill, …) makes conhost pop a visible console window for the child;
detached: trueforces a brand-new console outright. In practice users see console windows flashing during agent activity — e.g. session-worker spawns whose console ends up titled with the ipython kernel command line, and cmd.exe flashes onshell: true/execSyncpaths.An earlier pass added
windowsHideto the kernel/bootstrap/exec/session-lease spawns; this PR sweeps all the remaining spawn sites:detached: true): session-worker spawn + replacement in the supervisor, daemon launch, background daemon start, replacement supervisor, update-restart coordinatorkillProcessTree's taskkill, autonomous runner, footer git probes!commandconfig-value resolution (execSync fallback),where bash.exedetection, git context capture, clipboard tools (incl. the WSL powershell read), tool detection, session-file trashCompatibility
windowsHideis ignored on non-Windows platforms, so this is a no-op elsewhere. No behavior change beyond suppressing the stray console windows.🤖 Generated with Claude Code
Note
Hide Windows console windows for all spawned subprocesses in coding-agent
Adds
windowsHide: trueto everyspawn,spawnSync,execFile, andexecSynccall across the coding-agent package so that no console windows flash on screen when the agent spawns subprocesses on Windows. The change covers daemon lifecycle, session workers, bash tools, git helpers, clipboard utilities, package manager commands, and RPC client launches.Macroscope summarized 5457e40.